export const businessStatusOptions = [
  { label: "草稿", value: "DRAFT" },
  { label: "在办", value: "UNDO" },
  { label: "办结", value: "DONE" },
  { label: "审批中", value: "AUDIT" },
  { label: "已审批", value: "AUDITED" },
  { label: "已归档", value: "FINISH" },
  { label: "已撤回", value: "REBACK" },
];

export const formData = {
  businessId: "",
  businessType: "",
  auditMemo: "",
  agentName: "",
  title: "",
  deptName: "",
  createTime: "",
  telephone: "",
  startTime: "",
  endTime: "",
  content: "",
  auditItems: [],
  businessStatus: "",
  auditorIds: "",
  auditorNames: "",
  busiAttachIds: "", //文件ids
  busiAttachs: [],
};

export const baseFileds = (type) => {
  return [
    {
      key: "agentName",
      filedType: "Input",
      label: "经办人",
      span: 12,
      disabled: true,
    },
    {
      key: "deptName",
      filedType: "Input",
      label: "经办部门",
      span: 12,
      disabled: true,
    },
    {
      key: "createTime",
      filedType: "Input",
      label: "发起日期",
      span: 12,
      disabled: true,
      isTimeFilter: true,
    },
    {
      key: "telephone",
      filedType: "Input",
      label: "联系电话",
      span: 12,
      disabled: type !== "add",
      props: {
        placeholder: "请输入联系电话",
        type: "number",
      },
    },
    {
      key: "title",
      filedType: "Input",
      label: "文件标题",
      span: 24,
      disabled: type !== "add",
      props: {
        placeholder: "请输入",
        rules: [
          { required: true, message: "请输入文件标题", trigger: "change" },
        ],
      },
    },
    {
      key: "content",
      filedType: "Input",
      label: "正文",
      span: 24,
      disabled: type !== "add",
      props: {
        placeholder: "请输入",
        type: "textarea",
        rules: [{ required: true, message: "请输入正文", trigger: "change" }],
      },
    },
  ];
};
